/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multi.agent.simulation.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Owner
 */
@Embeddable
public class RutasPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "desde")
    private int desde;
    @Basic(optional = false)
    @Column(name = "hasta")
    private int hasta;

    public RutasPK() {
    }

    public RutasPK(int desde, int hasta) {
        this.desde = desde;
        this.hasta = hasta;
    }

    public int getDesde() {
        return desde;
    }

    public void setDesde(int desde) {
        this.desde = desde;
    }

    public int getHasta() {
        return hasta;
    }

    public void setHasta(int hasta) {
        this.hasta = hasta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) desde;
        hash += (int) hasta;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RutasPK)) {
            return false;
        }
        RutasPK other = (RutasPK) object;
        if (this.desde != other.desde) {
            return false;
        }
        if (this.hasta != other.hasta) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "multi.agent.simulation.entity.RutasPK[ desde=" + desde + ", hasta=" + hasta + " ]";
    }
    
}
